package com.stox.client.ui.javafx.chartingy.application;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.stox.client.core.application.AbstractApplication;
import com.stox.client.ui.javafx.chartingy.widget.menu.ChartingContextMenuConfigurer;
import com.stox.client.ui.javafx.widget.ContextMenuConfigurerRegistry;

@Component
public class ChartingApplication extends AbstractApplication {

	@Autowired
	private ChartingContextMenuConfigurer chartingContextMenuConfigurer;

	@Override
	public void register() {
		super.register();
		ContextMenuConfigurerRegistry.getInstance().addContextMenuConfigurer(chartingContextMenuConfigurer);
	}

	@Override
	public String getName() {
		return null;
	}

	@Override
	public void stop() {
		/*
		 * ContextMenuConfigurerRegistry.getInstance().detachContextMenu( ChartingContextMenu.getInstance());
		 */
		ContextMenuConfigurerRegistry.getInstance().removeContextMenuConfigurer(chartingContextMenuConfigurer);
		super.stop();
	}

}
